package com.vinyl.android.chinese.fragment;

import java.util.ArrayList;

import com.vinyl.android.chinese.R;
import com.vinyl.android.chinese.adapter.DicDbAdapter;
import com.vinyl.android.chinese.adapter.DicExpandableAdapter;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ExpandableListAdapter;
import android.widget.ExpandableListView;

public abstract class BaseExpandableListFragment extends Fragment {
	private ExpandableListView mListView;
	
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
    		Bundle savedInstanceState) {
    	View v = inflater.inflate(R.layout.expand_listview, container, false);
    	return v;
    }
    
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		
		
		mListView = (ExpandableListView)getActivity().findViewById(R.id.listview);		
		mListView.setAdapter(getDicAdapter());
	}	
	
	public abstract ExpandableListAdapter getDicAdapter();
}
